// 书写首页样式

// 导入common.less文件
@import "common";

//body样式
body {
    position: relative;
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial, Helvetica, STHeiTi, sans-serif;
    background: #f2f2f2;
}
// 清除ul和ol样式
ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

// top-banner区域
.top-banner {
    position: relative;
    width: 15rem;
    height: 2rem;
    //背景图
    & a:nth-child(1) {
        display: block;
        width: 100%;
        height: 100%;
        & img {
            display: block;
            height: 100%;
            width: 100%;
        }
    }
    //关闭按钮
    & a:nth-child(2) {
        position: absolute;
        top: 0.5rem;
        left: 0.1rem;
        width: 1rem;
        height: 1rem;
        background: url(../images/close.png) no-repeat center center;
        background-size: 0.6rem auto;
    }
}

// header区域
.header {
    width: 15rem;
    height: 3.6rem;
    background: #ffdb47;
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 15rem;
        height: 1.76rem;
        padding: 0 0.68rem;
        box-sizing: border-box;
        & a:nth-child(1) {
            width: 0.72rem;
            height: 1.2rem;
            img {
                width: 100%;
            }
        }
        & a:nth-child(2) {
            width: 9rem;
            height: 1.1rem;
            img {
                width: 100%;
            }
        }
        & a:nth-child(3) {
            width: 0.72rem;
            height: 1.2rem;
            img {
                width: 100%;
            }
        }
    }
    .header-bottom {
        position: relative;
        width: 15rem;
        height: 1.84rem;
        padding: 0 0.48rem;
        box-sizing: border-box;
        a {
            position: absolute;
            left: 0.48rem;
            top: 0;
            display: block;
            width: 14.04rem;
            height: 1.76rem;
        }
        i {
            position: absolute;
            left: 0.84rem;
            top: 0.52rem;
            width: 0.72rem;
            height: 0.72rem;
            background: url(../images/search_btn.png) no-repeat 0 0;
            background-size: 0.72rem auto;
        }
        form {
            display: flex;
            align-items: center;
            width: 14.04rem;
            height: 1.76rem; 
            input {
                width: 14.4rem;
                height: 1.28rem;
                border: 0;
                padding: 0.06rem 0.4rem 0 1.3rem;
                box-sizing: border-box;
                border-radius: 0.62rem;
                background: #fff;
                font-size: 0.56rem;
                line-height: 1.28rem;
            }
        }
    }
}

// banner区域
.banner {
    position: relative;
    width: 15rem;
    height: 5.2rem;
    background: url(../images/banner_bg.png) no-repeat 0 0;
    background-size: 15rem auto;
    ul {
        position: relative;
        width: 14.04rem;
        height: 5.2rem;
        margin: 0 auto;
        border-radius: 0.48rem;
        background: #cccccc;
        overflow: hidden;
        li {
            position: absolute;
            top: 0;
            left: 100%;
            width: 100%;
            height: 100%;
            &.now {
                left: 0;
            }
            img {
                display: block;
                width: 100%;
                height: 100%;
            }
        }
    }
    ol {
        display: flex;
        justify-content: space-between;
        position: absolute;
        left: 50%;
        bottom: 0.2rem;
        width: 2rem;
        height: 0.2rem;
        margin-left: -1rem;
        li {
            width: 0.2rem;
            height: 0.2rem;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            &.now {
                background: rgba(255, 255, 255, 1);
            }
        }
    }
}

//cuxiao区域
.cuxiao {
    width: 15rem;
    margin-top: 20px;
    img {
        float: left;
        width: 33.3333%;
    }
}

//nav区域
.nav {
    width: 15rem;
    ul {
        width: 100%;
        overflow: hidden;
        li {
            float: left;
            width: 3rem;
            height: 2.84rem;
            text-align: center;
            img {
                display: block;
                width: 1.68rem;
                height: 1.68rem;
                margin: 0.48rem 0.66rem 0;
            }
            p {
                margin: 0.1rem 0 0.44rem;
                font-size: 0.44rem;
                line-height: 0.56rem;
                color: #666;
            }
        }
    }
}

//footer区域
.footer {
    position: fixed;
    bottom: 0;
    width: 15rem;
    height: 2rem;
    border-top: 0.02rem solid #ccc;
    background: #ffffff;
    font-size: 0.4rem;
    line-height: 0.64rem;
    text-align: center;
    li {
        float: left;
        width: 20%;
        span {
            display: block;
            width: 0.96rem;
            height: 0.96rem;
            margin: 0.24rem 1.02rem 0;
            background: url(../images/nav.png) no-repeat 0 0;
            background-size: 0.96rem auto;
        }
        p {
            margin: 0;
        }
    }
}

//猜你喜欢
.likes {
    width: 100%;
    margin-bottom: 3rem;
    padding: 0 0.48rem;
    box-sizing: border-box;
    & p:nth-child(1) {
        margin: 0.48rem 0 0;
        height: 1.2rem;
        background: url(../images/cnxh-img.webp) no-repeat center 0;
        background-size: auto 1.2rem;
    }
    .list {
        display: flex;
        justify-content: space-between;
        li {
            width: 6.84rem;
            padding-bottom: 0.28rem;
            margin-bottom: 0.36rem;
            background: #fff;
            font-size: 0.36rem;
            border-radius: 0.2rem;
            overflow: hidden;
            a {
                display: block;
                text-decoration: none;
                color: #333;
                img {
                    display: block;
                    width: 100%;
                }
                .title {
                    margin: 0.36rem 0.24rem 0;
                    font-weight: 700;
                    font-size: 0.5rem;
                    line-height: 0.66rem;
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 2;
                    overflow: hidden;
                }
                .tips {
                    margin: 0.22rem 0.24rem 0.48rem;
                    overflow: hidden;
                    span {
                        float: left;
                        padding: 0.04rem 0.24rem;
                        margin: 0 0.06rem 0 0.04rem;
                        border: 0.02rem solid #FFBB00;
                        border-radius: 0.1rem;
                        background: #FEFBEE;
                        line-height: 0.36rem;
                    }
                }
                .money {
                    margin: 0 0 0 0.24rem;
                    overflow: hidden;
                    & span:nth-child(1),
                    & span:nth-child(3) {
                        font-size: 0.48rem;
                        line-height: 0.56rem;
                        color: #ff4422;
                    }
                    & span:nth-child(2) {
                        font-size: 0.72rem;
                        line-height: 0.72rem;
                        font-weight: 700;
                        color: #ff4422;
                    }
                    & span:nth-child(4) {
                        margin-left: 0.26rem;
                        font-size: 0.4rem;
                        line-height: 0.76rem;
                        color: #999;
                    }
                }
            }
        }
    }
}